<template>
  <el-dialog :visible.sync="visible" v-dialogDrag :title="title" class="tl-dialog" width="1300px" @open="open" @close="close">
    <el-form class="tl-form" ref="form" :model="model" :rules="rules" label-width="150px" :disabled="disableEditSubmit">
      <el-row>
        <el-col :span="12">
          <el-form-item label="页面名称" prop="name" :rules="rules.validateRequire">
            <el-input v-model="model.name" maxlength="85" style="width:100%"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="页面编码" prop="code" :rules="rules.validateRequire">
            <el-input v-model="model.code" maxlength="85" style="width:100%"/>
          </el-form-item>
        </el-col>
      </el-row>
       <el-row>
        <el-col :span="24">
          <el-form-item label="扩展1">
            <el-input v-model="model.extendfield1" maxlength="85" style="width:100%"/>
          </el-form-item>
        </el-col>
      </el-row>
       <el-row>
        <el-col :span="24">
          <el-form-item label="扩展2">
            <el-input v-model="model.extendfield2" maxlength="85" style="width:100%"/>
          </el-form-item>
        </el-col>
      </el-row>
       <el-row>
        <el-col :span="24">
          <el-form-item label="扩展3">
            <el-input v-model="model.extendfield3" maxlength="85" style="width:100%"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="备注">
            <el-input v-model="model.description" rows="3" type="textarea"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12" >
          <el-form-item label="排序码" prop="sortcode" :rules="rules.validateIntGteZero">
            <el-input v-model="model.sortcode"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="有效" prop="enabled" :rules="rules.validateRequire">
            <el-select v-model="model.enabled" placeholder="请选择">
              <el-option v-for="item in enabledList" :key="item.code" :label="item.name" :value="parseInt(item.code)" />
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button :type="disableEditSubmit === false ? 'text' : 'primary'" @click="doCancelEdit">取消</el-button>
      <el-button type="primary" @click="doSubmitEdit" :loading="saveLoading" v-if="disableEditSubmit === false">确认</el-button>
    </div>
  </el-dialog>
</template>

<script>
/** mixins */
import { mixin_edit } from "@tapui/mixins/mixin_edit"
import tlRefTreeModule from "@tapui/components/Tap/Ref/RefTree"
import { putAction, getAction, postAction } from "@tapui/utils/http"
export default {
  components: { tlRefTreeModule },
  mixins: [mixin_edit],
  data() {
    return {
      moduleTitle: "APP审批页面管理详情",
      urlPrefix: '/app/appPage/',
      url: {
      }
    }
  },
  props: {
    enabledList: {
      type: Array,
      default: function() {
        return []
      }
    }
  },
  methods: {},
  watch: {
    "model.dispdept_code_array"(newVal, oldVal) {
      console.log(newVal)
    }
  }
}
</script>

<style lang="scss"></style>
